package com.dji.compose_learning

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.ui.Modifier
import com.dji.compose_learning.ui.theme.Compose_learningTheme
import com.dji.compose_learning.ui.view.ItemView
import com.dji.compose_learning.ui.view.Message

class SimpleExampleActivity:ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            setContent {
                Compose_learningTheme {
                    // A surface container using the 'background' color from the theme
                    Surface(
                        modifier = Modifier.fillMaxSize(),
                        color = MaterialTheme.colorScheme.background
                    ) {
                    ItemView(Message("buobao",
                        "hello,my name is buobao.How are you?\n my name is guoguo,a very lovely baby!"))
                    }
                }
            }
        }
    }
}